package com.ziyun.pop.modules.order.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ziyun.pop.modules.order.dto.TwbOrderListDto;
import com.ziyun.pop.modules.order.entity.ErpOrderEntity;
import com.ziyun.pop.modules.storeMember.entity.UserBaseInfoEntity;
import io.renren.common.utils.R;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * erp订单信息表
 * 
 * @author llc
 * @email 787254039@qq.com
 * @date 2018-09-25 10:59:08
 */
public interface ErpOrderDao extends BaseMapper<ErpOrderEntity> {

    List<ErpOrderEntity> queryPageErpOrderList(Page<ErpOrderEntity> page,@Param("map") Map<String,Object> params);

    List<String> querySalesManList(@Param("sellerId") Long sellerId);

    List<String> queryRegionsSascade();

    int updateByMap(@Param("map") Map<String,Object> map, @Param("orderNo") String orderNo);

    /**
     * 取消订单分配信息
     * @param orderNo
     * @return
     */
    int cancelOrderAllotInfo(@Param("orderNo") String orderNo);

    //查询订单带预存款
    ErpOrderEntity getErpOrder(String orderNo);

    void batchEnter(@Param("map") Map<String,Object> map,@Param("ids") List<String> idList);

    List<BigDecimal> getDayCount(@Param("map")Map<String,Object> params);

    List<BigDecimal> getMonthCount(@Param("map")Map<String,Object> params);

    List<BigDecimal> getYearCount(@Param("map") Map<String,Object> params);

    //批量修改
    void batchUpdate(@Param("map") Map<String,Object> map,@Param("ids") List<String> idList);

    List<ErpOrderEntity> querytTwbPageErpOrderList(@Param("map") Map<String,Object> params);

    //图文宝月结订单查询金额
    List<BigDecimal> queryTwbMonthMoney(@Param("map") Map<String,Object> moneyMap);

    Integer selectTwbTotal(@Param("map") Map<String,Object> params);
    //图文宝手机订单列表
    List<TwbOrderListDto> queryPageForTwbOrderList(@Param("map") Map<String,Object> map);

    Long getCountForTwbOrderList(@Param("map") Map<String,Object> map);
}
